﻿@{
    ViewBag.Title = "修改个人资料";
    ViewBag.Page = "person";
    ViewBag.Menu = "modifyinfo";
    ViewBag.Header = "info";
    Layout = "~/Views/Shared/_PersionLayout.cshtml";
    
}

@section HeadJavaScript{
    <script src="~/Scripts/angular/base/angular.min.js" type="text/javascript"></script>
    <!--[if (IE 6)|(IE 7)]><script type="text/javascript" src="~/Scripts/angular/base/json2.js"></script><![endif]-->
    <script src="~/Scripts/angular/js/modifybaseinfo.js" type="text/javascript"></script>
    <script src="~/Scripts/angular/base/angular.autoload.js" type="text/javascript"></script>
}
    @{
        if (@Model)
        {
            <text>
			<div class="pos"><img src="~/images/images/pay_dian.jpg" /> <a href="#">会员中心</a> - 修改资料</div>
        	<div class="form1" style="background:none;">
                <p style="margin:60px 0 0 0;" class="tc"><img src="~/images/images/safe_img3.jpg" /></p>
                <p style="margin:40px 0 0 0;" class="tc c999">注册资料是申请密码找回，装备找回等服务的重要凭证，请务必填写并牢记； </p>
            </div>
            </text>
        }
        else
        {
            <div class="pos"><img src="~/images/images/pay_dian.jpg" /> <a href="#">会员中心</a> - 修改资料</div>
        	<div class="form1" style="background:none;">
			 <p class="laba">您的注册尚未填写，请及时补填您的资料! </p>
				<form class="form1 st_form" name="form"  on-submit="submit()" onsubmit="return false;" ng-controller="Ctrl" ng-init="load({
                    year:{msg:'请选择年份以及月份',error:'请选择年份以及月份',success:true},
                    month:{msg:'请选择年份以及月份',error:'请选择年份以及月份',success:true},
                    province:{msg:'请选择省份',error:'请选择省份',success:true},
                    phonenum:{msg:'请输入正确有效的电话号码！',error:'请输入正确有效的电话号码！',success:true},
                    submit:{error:'网络连接,异常请联系管理员',phone:'对不起，您输入的电话号码有误'}
                    });
                    submit.url='/account/addbaseinfo/@ViewData["code"]';
                    redirect.url='/account/modifyinfo/r/Default/@ViewData["code"]';
                    years=[
                        @for (int startyear = DateTime.Now.Year - 50; startyear <= DateTime.Now.Year; startyear++)
                        {
                            if (startyear == DateTime.Now.Year)
                            {<text>{value:'@startyear',text:'@startyear'}</text>}
                            else
                            {<text>{value:'@startyear',text:'@startyear'},</text>}

                        }
                    ];
                    months=[
                        @for (int startmonth = 1; startmonth <= 12; startmonth++)
                        {
                            if (startmonth == 12)
                            {<text>{value:'@startmonth',text:'@startmonth 月份'}</text>}
                            else
                            {<text>{value:'@startmonth',text:'@startmonth 月份'},</text>}
                        }
                    ];
                    provinces=[
                        {value:'北京',text:'北京'},
                        {value:'上海',text:'上海'},
                        {value:'天津',text:'天津'},
                        {value:'重庆',text:'重庆'},
                        {value:'安徽',text:'安徽'},
                        {value:'甘肃',text:'甘肃'},
                        {value:'广东',text:'广东'},
                        {value:'广西',text:'广西'},
                        {value:'贵州',text:'贵州'},
                        {value:'福建',text:'福建'},
                        {value:'海南',text:'海南'},
                        {value:'河北',text:'河北'},
                        {value:'河南',text:'河南'},
                        {value:'黑龙江',text:'黑龙江'},
                        {value:'湖北',text:'湖北'},
                        {value:'湖南',text:'湖南'},
                        {value:'吉林',text:'吉林'},
                        {value:'江苏',text:'江苏'},
                        {value:'江西',text:'江西'},
                        {value:'辽宁',text:'辽宁'},
                        {value:'内蒙古',text:'内蒙古'},
                        {value:'宁夏',text:'宁夏'},
                        {value:'青海',text:'青海'},
                        {value:'山东',text:'山东'},
                        {value:'山西',text:'山西'},
                        {value:'陕西',text:'陕西'},
                        {value:'四川',text:'四川'},
                        {value:'西藏',text:'西藏'},
                        {value:'新疆',text:'新疆'},
                        {value:'云南',text:'云南'},
                        {value:'浙江',text:'浙江'},
                        {value:'港澳台',text:'港澳台'},
                        {value:'海外',text:'海外'},
                        {value:'其它',text:'其它'}
                    ];
                    ">
                    <table class="tab1" width="720">
                    <tr>
                        <td width="115"><span class="txtr">出生年月：</span> </td>
                        <td width="270">
                        <select id="select1" class="text120" name="year"  ng-init="year.value=years[0]"   ng-change="year.validate()" ng-model="year.value" ng-options="q.text for q in years" required></select>
                        <select name="month" class="text120" ng-init="month.value=months[0]"  ng-change="month.validate()" ng-model="month.value" ng-options="q.text for q in months"  required>    
						</select> 
                        </td>
                        <td>
                        	<span class="error" ng-show="year.error||month.error" style="display:none;"><img src="~/images/images/error.jpg" /> {{year.error}}</span>
						    <span ng-show="(!year.error&&!year.success&&year.msg)||(!month.error&&!month.success&&month.msg)" ng-bind-template="{{year.msg}}"></span>
						    <span  ng-show="year.success&&month.success" style="display:none;"><img src="~/images/images/right.jpg" /></span>    
                        </td>
                    </tr>
                    <tr>
                        <td><span class="txtr">所在省份：</span> </td>
                        <td>
                            <select class="text260" name="province" title="所在省份" ng-init="province.value=provinces[0]" ng-change="province.validate()"  ng-model="province.value" ng-options="q.text for q in provinces"    required>
                            </select>

                        </td>
                        <td>	
                        <span class="error" ng-show="province.error" style="display:none;"><img src="~/images/images/error.jpg" /> {{province.error}}</span>
						<span ng-show="!province.error&&!province.success&&province.msg" ng-bind-template="{{province.msg}}"></span>
						<span  ng-show="province.success" style="display:none;"><img src="~/images/images/right.jpg" /></span> 
                        </td>
                    </tr>
                    <tr>
                        <td><span class="txtr">手机号码：</span> </td>
                        <td>
                            <input type="text" class="text270" name="phonenum" ng-init="phonenum.input()" on-focus="phonenum.input()" on-blur="phonenum.validate();" ng-model="phonenum.value" ng-pattern="/^1(([38][0-9]{9})|(([4][57])|([5][^4,\D]))[0-9]{8})$/" required/>
						
                        </td>
                        <td>
                        	<span class="error" ng-show="phonenum.error" style="display:none;"><img src="~/images/images/error.jpg" /> {{phonenum.error}}</span>
						    <span  ng-show="!phonenum.error&&!phonenum.success&&phonenum.msg" ng-bind-template="{{phonenum.msg}}"></span>
						    <span ng-show="phonenum.success" style="display:none;"><img src="~/images/images/right.jpg" /></span>
                        </td>
                    </tr>
                    <tr ng-show="submit.error" style="display:none">
                    <td></td>
                    <td colspan="2">
                         <span class="error">{{submit.error}}</span>
                    </td>
                </tr>
                    <tr>
                    	<td></td>
                        <td align="center">
                        	<input type="submit" value="" class="safe_tj" />
                        </td>
                        <td></td>
                    </tr>
                </table>
	        </form>
            <p style="margin:20px 0 0 140px;" class="c999">注册资料是申请密码找回，装备找回等服务的重要凭证，请务必填写并牢记； </p>
	 	</div>
				       
               
        }
                        
    }

					
